package com.fc.mall.decoration.widget.object;

import com.fc.mall.decoration.widget.object.coupon.Coupon;
import com.fc.mall.decoration.widget.object.picture.Picture;
import com.fc.mall.decoration.widget.object.blank.Blank;
import com.fc.mall.decoration.widget.object.carousel.Carousel;
import com.fc.mall.decoration.widget.object.cube.Cube;
import com.fc.mall.decoration.widget.object.grid.Grid;
import com.fc.mall.decoration.widget.object.navigation.Navigation;
import com.fc.mall.decoration.widget.object.product.ProductList;
import com.fc.mall.decoration.widget.object.promotion.PromotionList;
import com.fc.mall.decoration.widget.object.title.TitleWidget;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;

@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "partialType", visible = true)
@JsonSubTypes({@JsonSubTypes.Type(value = Blank.class, name = "3"),
        @JsonSubTypes.Type(value= TitleWidget.class, name="4"),
        @JsonSubTypes.Type(value= Picture.class, name="5"),
        @JsonSubTypes.Type(value= Carousel.class, name="7"),
        @JsonSubTypes.Type(value= Navigation.class, name="8"),
        @JsonSubTypes.Type(value= Grid.class, name="9"),
        @JsonSubTypes.Type(value= Cube.class, name="14"),
        @JsonSubTypes.Type(value= ProductList.class, name="15"),
        @JsonSubTypes.Type(value= PromotionList.class, name="17"),
        @JsonSubTypes.Type(value= PromotionList.class, name="18"),
        @JsonSubTypes.Type(value= Coupon.class, name="19")})
public abstract class Widget {
    private String partialType;
}
